package org.jfonia.musicxml.model;

import org.w3c.dom.Node;

/**
 * pitch WITHOUT octave or register, i.e. only step and alter <br>
 * occurs in Note, but also in Harmony
 * 
 * @author Wijnand
 * 
 */
public class PitchClass extends Element
{
	private String	step;		// "C", "D", ... 
	private int		alter;		// 0:natural, 1:sharp, 1:flat etc.

	public PitchClass(Node node)
	{
		super(node);
	}
	
	public PitchClass(Node node, String step, int alter)
	{
		super(node);
		this.step = step;
		this.alter = alter;
	}
	

	public void setAlter(int alter)
	{
		this.alter = alter;
	}

	public int getAlter()
	{
		return alter;
	}

	public void setStep(String step)
	{
		this.step = step;
	}

	public String getStep()
	{
		return step;
	}

//	public String toString()
//	{
//		StringBuffer sb = new StringBuffer(step);
//		if (alter==-2)
//			sb.append("bb");
//		else if (alter==-1)
//			sb.append("b");
//		else if (alter==0)
//			;
//		else if (alter==1)
//			sb.append("#");
//		else if (alter==2)
//			sb.append("##");
//		else 
//			sb.append("?");
//		return sb.toString();
//	}
}
